home *** CD-ROM | disk | FTP | other *** search
- Path: sun001.spd.dsccc.com!jmccarty
- From: jmccarty@sun1307.spd.dsccc.com (Mike McCarty)
- Newsgroups: comp.lang.c
- Subject: Re: Small problem with C...
- Date: 18 Apr 1996 20:33:18 GMT
- Organization: DSC Communications Corporation
- Message-ID: <4l68ue$e7l@sun001.spd.dsccc.com>
- References: <4ko44f$jf2@venus.compulink.gr> <3172F91C.41C6@gi.alaska.edu> <3172FA76.794B@gi.alaska.edu>
- NNTP-Posting-Host: sun1307.spd.dsccc.com
-
- In article <3172FA76.794B@gi.alaska.edu>,
- Jason Wynne Parsons <jason@gi.alaska.edu> wrote:
- )One correction, the line which includes:
- )
- )rand()%6 + 1;
- )
- )should be:
- )
- )rand()%5 + 1;
- )
- )sorry,
- )
- )Jason
-
-
- Please note that you are extracting the -low order- bits from the
- pseudo-random sequences. This is a -poor- way to do what you want. The
- usual pseudo-random generators create bit patterns where the more
- significant bits are -much- better than the low-order bits.
-
- Mike
- --
- ----
- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
-
- I don't speak for DSC. <- They make me say that.
-